//
//  MovieDataHelper.m
//  shipin
//
//  Created by lanou3g on 15/11/19.
//  Copyright © 2015年 lanou3g. All rights reserved.
//

#import "MovieDataHelper.h"
#import "NetWorkHandle.h"
#import <UIKit/UIKit.h>
@interface MovieDataHelper ()
@property (nonatomic, strong) NSMutableArray *allMovieModelsArray;
@end

@implementation MovieDataHelper
#pragma mark ----获取单例对象 当多个页面用相同资源的时候 和应用程序生命周期一样
+ (instancetype)shareMovieDataHelper{
    
    static MovieDataHelper *helper = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        helper = [[MovieDataHelper alloc] init];
    });
    return helper;

}
- (NSMutableArray *)allMovieModelsArray
{
    if (!_allMovieModelsArray) {
        _allMovieModelsArray = [NSMutableArray array];
    }
    return _allMovieModelsArray;


}

#pragma mark ----- 请求数据，并封装成model对象
- (void)requestMovieModelsWithUrlString:(NSString *)urlString didFinished:(BLOCK)resurt{




}

#pragma mark ----- 获取model对象个数
- (NSInteger)countOfAllMusicModels{
    return _allMovieModelsArray.count;
}


#pragma mark ----- 根据indexpath获取数组中的某个model对象
- (MovieModel *)getMovieModelWithIndexPath:(NSIndexPath *)indexPath{

    return _allMovieModelsArray[indexPath.row];

}
@end
